#ifndef CTEST_H
#define CTEST_H
#include "CListQuestion.h"
#include <QtXml/QtXml>
#include "CQuestion.h"
#include "CPrintSettings.h"

class CTest
{
public:
    CTest();
    ~CTest();
    bool parseDomDocument(QDomDocument domDoc);
    QDomDocument getDomDocument();
    void removeChildFormDomDocument(int n);
    CListQuestion getListQuestion();
    void setListQuestion(CListQuestion lq);
    void setPrintSettings(CPrintSettings ps);
    CPrintSettings getPrintSettings();

private: //members
    CListQuestion *listQuestion;
    QDomDocument domDocument;
    CPrintSettings printSettings;
    CPageSettings *pageSettings;

private: //methods
    void traverseTestNode(const QDomNode &node, CQuestion &quest);
    QDomElement createDomElementTest(const CQuestion &t, int testNum);
};

#endif // CTEST_H
